<template>
  <mivaLink :to="href" class="adv-1__module">
    <img :src="image" class="adv-image" draggable="false" />
  </mivaLink>
</template>

<script>

export default {
    name: 'AdvModule_1',
    props: {
        href: {
            type: String,
            default: '/',
        },
        image: {
            type: String,
            default: 'https://resource.miva.work/articleArchiveCover/159177871902781826a53ab16db1277ffd70fd41296a4.jpg',
        },
    },
};
</script>

<style lang="less">
.adv-1__module {
  width: 100%;
  height: 118px;
  position: relative;
  overflow: hidden;
  transition: all 0.3s;
  border: 5px solid @base_color;
  box-shadow: 5px -5px 0px @base_color_2;
  &::before {
    content: "广告";
    padding: 4px 5px;
    position: absolute;
    top: 0;
    left: 20px;
    z-index: 1;
    transition: all 0.3s;
    border-radius: 0 0 4px 4px;
    background-color: @base_color;
    color: #fff;
  }
  &:hover {
    border-color: @base_color_2;
    box-shadow: -5px 5px 0px @base_color;
    &::before {
      background-color: @base_color_2;
    }
    .adv-image {
      transform: scale(1.01);
    }
  }
  .adv-image {
    object-fit: cover;
    display: block;
    width: 100%;
    transition: all 0.3s;
    user-select: none;
    pointer-events: none;
  }
}
</style>
